home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-04 | 3.1 KB | 126 lines | [TEXT/KAHL] |
- /********************************************************* DEFINITION
- DATE: 10/12/93
-
- CLASS: CPPTreeApp
-
- SUPERCLASS: CPPApplication
-
- This C++ class defines the backbone for the TestSA
- application.
-
-
- ********************************************************************/
-
- #include "CPPTreeApp.h"
- #include "CPPTreeAppMenuBar.h"
- #include "CPPString.h"
- #include "MyCommands.h"
- #include <CPPWindowManager.h>
- #include <FileTools.h>
- #include <StringTools.h>
- #include <GraphicsTools.h>
- #include <CPPTreeArea.h>
- #include <CPPVisualTree.h>
- #include <CPPVisualTreeNode.h>
- #include <CPPPackedTreeNode.h>
- #include <CPPDRequest.h>
- #include "CPPTreeAppAboutBox.h"
-
- #include <Commands.h>
-
- #include <CPPStringList.h>
-
- extern CPPMenuBar *gMenuBar;
- extern CPPWindowManager *gWindowManager;
-
-
- /*-----------------------------------------------------------------*/
- /*------------------------ PUBLIC METHODS -------------------------*/
- /*-----------------------------------------------------------------*/
-
- CPPTreeApp::CPPTreeApp (void) : CPPApplication ()
- {
-
- }
-
- /*-----------------------------------------------------------------*/
-
- CPPTreeApp::~CPPTreeApp (void)
- {
-
- }
-
- /*-----------------------------------------------------------------*/
-
- Boolean CPPTreeApp::Member (char *className)
- {
- if (strcmp(className, CPPTreeApp::ClassName()) == 0)
- return TRUE;
- else
- return CPPApplication::Member(className);
- }
-
- /*-----------------------------------------------------------------*/
-
- char *CPPTreeApp::ClassName (void)
- {
- return "CPPTreeApp";
- }
-
- /*-----------------------------------------------------------------*/
- /*----------------------- PROTECTED METHODS -----------------------*/
- /*-----------------------------------------------------------------*/
-
- void CPPTreeApp::BuildMenuBar (void)
- {
- gMenuBar = new CPPTreeAppMenuBar ();
- }
-
- /*-----------------------------------------------------------------*/
-
- void CPPTreeApp::DoApplicationSetup(void)
- /* initialize application globals */
- {
- CPPString *STemp = new CPPString (String2String("\pROOT"), TRUE);
- CPPVisualTreeNode *TheNode = NULL;
- CPPPackedTreeNode *PTreeNode = NULL;
-
- TreeWindow = new CPPTreeWindow (gWindowManager, 1316);
- TheNode = new CPPVisualTreeNode (STemp, TreeWindow->theTreeArea, TRUE, FALSE);
- TreeWindow->theTreeArea->SetTopMostNode (TheNode);
- TreeWindow->theTreeArea->ForceResize(TRUE);
-
- PTreeWindow = new CPPPackedTreeWindow (gWindowManager, 1317);
- PTreeNode = new CPPPackedTreeNode (STemp, TreeWindow->theTreeArea, TRUE, FALSE);
- PTreeWindow->theTreeArea->SetTopMostNode (PTreeNode);
- PTreeWindow->theTreeArea->ForceResize(TRUE);
- }
-
- /*-----------------------------------------------------------------*/
-
- void CPPTreeApp::DoApplicationShutDown(void)
- /* close the communication port and get rid of the sound objects */
- /* The window manager will clean up our windows */
- {
-
- }
-
- /*-----------------------------------------------------------------*/
-
- Boolean CPPTreeApp::DoCommand (short commandID)
- {
-
- switch (commandID) {
-
- case kCmdAbout :
- DoAboutBox();
- break;
-
- default :
- return CPPApplication::DoCommand(commandID);
- break;
-
- }
- }
-
-